using System;
using System.Runtime.Serialization;

namespace YunBox2.Contracts.Core
{
	[DataContract]
	public class BizObject : DomainObject
	{
		[DataMember]
		public virtual Guid? Id
		{
			get;
			set;
		}

		[DataMember]
		public virtual User LastModifiedUser
		{
			get;
			set;
		}

		[DataMember]
		public virtual DateTime? LastModifiedTime
		{
			get;
			set;
		}

		[DataMember]
		private bool _isReadOnly = false;
	
		public virtual bool IsReadOnly
		{
			get
			{
				return _isReadOnly;
			}
			set
			{
				if(_isReadOnly==value)
				{
					_isReadOnly = value;
					RaisePropertyChanged("IsReadOnly");
				}
			}
		}

		public virtual Guid GetModuleId()
		{
			return Guid.Empty;
		}
	}
}